package com.leo.common;

import com.almasb.fxgl.core.collection.PropertyMap;
import com.almasb.fxgl.dsl.FXGL;
import javafx.geometry.Point2D;
import javafx.util.Duration;

import java.util.List;

public interface Config {

    PropertyMap map = FXGL.getAssetLoader().loadPropertyMap("properties/game.properties");

    /**
     * 每个表格的大小
     */
    int CELL_SIZE = 24;

    /**
     * 一秒移动150像素
     */
    int TANK_MOVE_SPEED = 150;

    /**
     * 子弹速度
     */
    int BULLET_SPEED = 400;

    /**
     * 每发子弹的时间间隔
     */
    Duration SHOOT_DELAY = Duration.seconds(0.35);

    /**
     * 坦克最大等级
     */
    int TANK_MAX_LEVEL = 3;

    /**
     * 坦克初始等级
     */
    int TANK_INIT_LEVEL = 1;

    /**
     * 旗帜周围土墙坐标
     */
    List<Point2D> POINT_2_D_LIST = List.of(
            new Point2D(288.0, 600.0 - 24),
            new Point2D(288.0, 624.0 - 24),
            new Point2D(288.0, 648.0 - 24),
            new Point2D(312.0, 600.0 - 24),
            new Point2D(336.0, 600.0 - 24),
            new Point2D(360.0, 600.0 - 24),
            new Point2D(360.0, 624.0 - 24),
            new Point2D(360.0, 648.0 - 24)
    );

    /**
     * 随机生成敌方坦克坐标点
     */
    Point2D[] SPAWN_ENEMY_POSITION = new Point2D[]{
            new Point2D(30, 30),
            new Point2D(330, 30),
            new Point2D(580, 30)
    };

    /**
     * 敌方坦克总数量
     */
    int MAX_ENEMY_NUM = 10;

    /**
     * 最大关卡
     */
    int MAX_LEVEL = 3;

    /**
     * 自定义地图tmx文件路径
     */
    String CUSTOM_LEVEL_PATH = "ConstructMap/level0.tmx";
    /**
     * 自定义地图data文件路径
     */
    String CUSTOM_LEVEL_DATA = "ConstructMap/level0.data";
}
